package com.hbwxz.user.controller;

import com.hbwxz.user.pojo.User;
import com.hbwxz.user.repository.UserRepository;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 测试连通性控制器
 *
 * @author shenzw
 * @date 2023/8/23
 */
@RestController
@RequestMapping("/demoTest")
@RequiredArgsConstructor
public class DemoTestController {


    private final UserRepository userRepository;

    @GetMapping("/test")
    public String test() {
        User user = userRepository.queryByUserName("hebwiwangxz");
        return user.getUserName();
    }
}
